package config

type MysqlConfig struct {
	Host     string `mapstructure:"host" json:"host"`
	Port     string `mapstructure:"port" json:"port"`
	Name     string `mapstructure:"db" json:"db"`
	User     string `mapstructure:"user" json:"user"`
	Password string `mapstructure:"password" json:"password"`
}

type ConsulConfig struct {
	Host string `mapstructure:"host" json:"host"`
	Port string `mapstructure:"port" json:"port"`
}

type ServiceConfig struct {
	Host         string       `mapstructure:"host" json:"host"`
	Port         int          `mapstructure:"port" json:"port"`
	Tags         []string     `mapstructure:"tags" json:"tags"`
	Name         string       `mapstructure:"name" json:"name"`
	MysqlConfig  MysqlConfig  `mapstructure:"mysql" json:"mysql"`
	ConsulConfig ConsulConfig `mapstructure:"consul" json:"consul"`
}

type JwtConfig struct {
	SigningKey string `mapstructure:"signing"`
}

type NacosConfig struct {
	IpAddress           string `mapstructure:"ip_address"`
	ContextPath         string `mapstructure:"context_path"`
	Port                uint64 `mapstructure:"port"`
	Scheme              string `mapstructure:"scheme"`
	NamespaceId         string `mapstructure:"namespace_id"`
	TimeoutMs           uint64 `mapstructure:"timeout_ms"`
	NotLoadCacheAtStart bool   `mapstructure:"not_load_cache_at_start"`
	LogDir              string `mapstructure:"log_dir"`
	CacheDir            string `mapstructure:"cache_dir"`
	LogLevel            string `mapstructure:"log_level"`
	Group               string `mapstructure:"group"`
	DataId              string `mapstructure:"data_id"`
}
